
<!--
 * @Author: wang_sheshe
 * @Date: 2021-05-17 15:04:17
 * @LastEditTime: 2021-07-17 15:14:58
 * @Description: 巡视开始信息确认页
-->
<template>
	<article class="bg_4dbfae">
		<!-- 头组件 -->
        <van-nav-bar title="缺陷详情" left-text="" left-arrow @click-left="back" fixed>
        </van-nav-bar>
        <div class="content1">
            <van-cell class="content-title" :border="false">
                <template slot="title">
                    <span class="border-icon"></span>
                    <span>缺陷发现信息</span>
                </template>
            </van-cell>
            <van-cell-group class="content-list" :border="false">
                <van-cell title="发现方式:" :value="defectInfo.discoveryWay"></van-cell>
                <van-cell title="发现人:" :value="defectInfo.discovererName" />
                <van-cell title="发现日期:" :value="showFormatDate(defectInfo.discoveryDate)" />
                <van-cell title="发现班组:" :value="defectInfo.discoveryCrewName" />
                <van-cell title="发现人单位:" :value="defectInfo.discoveryOrgName" />
                <van-cell title="登记时间:" :value="showFormatDate(defectInfo.createTime)" />
                <van-cell title="登记人:" :value="defectInfo.creatorName" />
            </van-cell-group>  
        </div>
        <div>
            <van-cell class="content-title" :border="false">
                <template slot="title">
                    <span class="border-icon"></span>
                    <span>缺陷描述信息</span>
                </template>
            </van-cell>
            <van-cell-group class="content-list" :border="false">
                <van-cell title="缺陷部位:" :value="defectInfo.defectLocationName"></van-cell>
                <van-cell title="缺陷性质:" :value="defectInfo.defectNature" />
                <van-cell title="分类依据:" :value="defectInfo.classifyGist" />
                <!-- <van-cell title="共性隐患:" value="item.time" /> -->
                <van-cell title="缺陷描述:" :value="defectInfo.defectDesc" />
            </van-cell-group>  
        </div>
	</article>
</template>

<script type="text/javascript">
	import Util from "@/utils/util"
	export default {
		name: 'DefectManage',
        props:{
            defectInfo:{
                type:Object,
                default: function() {
                    return {}
                }
            },
        },
		data() {
			return {
				
			}
		},
		computed:{
            showFormatDate() {//日期格式
                return function(val) {
                    return Util.DateUtil.getFormatDateByLong(val,'yyyy-MM-dd hh:mm')
                }
            }
        },
		methods: {
			back() {
                this.$emit("closeDetail")
            }
		},
		mounted() {
			console.log("defectInfo===",this.defectInfo)
		},
		
	}
</script>

<style scoped>
    article {
        display: flex;
        flex-direction: column;
        height: 100vh;
        font-family: 微软雅黑;
        background: #ffffff;
    }
    .content1{
        margin-top:45px;
    }
    .content-title .van-cell__title{
        font-size: 18px;
        color: #333;
    }
    .content-title .van-cell__value{
        font-size: 12px;
        color: #999;
    }
    .border-icon{
        width: 2px;
        height: 15px;
        border-radius: 10px;
        display: inline-block;
        background:#3CDAA8;
    }
    .content-list{
        width: calc(100% - 30px);
        margin: 10px 15px;
    }
    .content-list .van-cell{
        background-color: #F2F2F2;
    }
    .content-list .van-cell .van-cell__title{
        color: #999;
    }
    .content-list .van-cell .van-cell__value{
        color: #333;
    }
    .content-list .van-cell .van-cell__label{
        color: #333;
    }
</style>
